In conventional networks, various routing techniques may be used to transport data packets through the network. There may be multiple paths to transport the data packets between two nodes of the network. The network may be configured to split the traffic among these multiple paths. For example, a multipath routing technique may be used to determine how the traffic will be split among the multiple paths in the network. Exemplary multipath routing techniques may include Weighted Cost MultiPath (WCMP) routing and Equal Cost MultiPath (ECMP) routing. WCMP routing technique may distribute the traffic among available paths based on a set of pre-determined ratios. If the pre-determined ratios are equal, the WCMP routing may be a ECMP routing where the traffic is distributed evenly among the available paths. WCMP routing may be accomplished using a multipath table.
In conventional networks, the number of entries supported by a multipath table may be limited and may not be able accommodate the various multi-path forwarding rules to support hundreds to thousands of traffic flows. Therefore, a technique is needed to reduce the number of entries to be programmed into a multipath table for a given set of WCMP forwarding rules.